package com.woniuxy.carrental.zqqmapper;

import com.woniuxy.carrental.entity.Details;
import com.woniuxy.carrental.entity.RentCarPrice;
import com.woniuxy.carrental.entity.RentCarType;
import com.woniuxy.carrental.mapper.RentCarTypeMapper;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.List;

/**
 * @author author
 * @create 2021-09-28 13:52
 */


@SpringBootTest
public class TsetRenrCarTypeMapper {

    @Autowired
    RentCarTypeMapper rentCarTypeMapper;

    @Test
     public void testaddrentCarType(){
       rentCarTypeMapper.addRentCarType(new RentCarType(null,new RentCarPrice(1, null, null, 12.0), "本田",new Details(),1));
     }

    @Test
    public void testselectrentCarType(){
        List<RentCarType> rentCarTypes = rentCarTypeMapper.selectAllRentCarType();
        System.out.println(rentCarTypes);
    }

    @Test
    public void testselectrente(){
        RentCarType gettypebyid = rentCarTypeMapper.gettypebyid(1);
        System.out.println(gettypebyid);
    }






}
